package entity;

import java.util.*;
import java.io.Serializable;

import client.Client;

public class DisabledPlace implements Serializable
{
	private static final long serialVersionUID = 7523999933510580143L;
	
	private int parkingLot;
	public int[] place;
	private String description;
	private Date start=null;
	private Date end=null;
	
	public DisabledPlace(int p, int []pl, String desc)
	{
		this.setParkingLot(p);
		this.place=new int[pl.length];
		for(int i=0; i<pl.length; i++)
			place[i]=pl[i];
		this.setDescription(new String(desc));
	}
	
	public boolean Validate(int p, int []pl,String desc)
	{
		if(p<1 || p>6)
			return false;
		return true;
	}
	public void save()
	{
		Client.saveDisabledPlaceToDB(this);
	}

	public Date getEnd() {
		return end;
	}

	public void setEnd(Date end) {
		this.end = end;
	}

	public Date getStart() {
		return start;
	}

	public void setStart(Date start) {
		this.start = start;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getParkingLot() {
		return parkingLot;
	}

	public void setParkingLot(int parkingLot) {
		this.parkingLot = parkingLot;
	}
}
